from Base import message, intersect, SS_VALID
from DRG import MDCO_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["73.6x00x002","73.6x01","73.6x02","73.8x00x002","73.8x00x005","73.8x02","73.9200","75.4x00x001","75.4x00x002","75.4x00x003","75.5100","75.5200","75.6901","75.6902","75.6903","75.6904","75.6905","75.8x00","75.8x00x001","75.9100x001","75.9200x001","75.9200x002","75.9201","75.9202","75.9203","75.9300","75.9400x001"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合OC2入组条件，匹配规则：主手术匹配')

    if MDCO_DRG.OC29_group(record):
      return 'OC29'
        
    return 'OC2'
  else:
    return ''
    
